$(document).ready(
	function() {
	var canvas = document.getElementById('canvas');
	
	var stage = new JTopo.Stage(canvas);//构建舞台
	// showJTopoToobar(stage);// 显示工具栏
	
	var scene = new JTopo.Scene(stage);//构建场景
	scene.background = './img/bg.jpg';//设置场景背景图片 , 默认剧中拉伸
	
	var node = new JTopo.Node("Hello");//构建节点
	node.setLocation(209, 269);//节点偏移量设置  setLocation(X,Y);
	scene.add(node);//场景添加节点
	
	
	//节点注册事件  8 个事件： 鼠标按下、鼠标松开、单击、双击、拖曳、鼠标悬停、鼠标移入、鼠标移出
	node.mousedown(function(event) {
				if (event.button == 2) {
					node.text = '按下右键';
				} else if (event.button == 1) {
					node.text = '按下中键';
				} else if (event.button == 0) {
					node.text = '按下左键';
				}
			});
	
	node.mouseup(function(event) {
				if (event.button == 2) {
					node.text = '松开右键';
				} else if (event.button == 1) {
					node.text = '松开中键';
				} else if (event.button == 0) {
					node.text = '松开左键';
				}
			});
	node.click(function(event) {
				console.log("单击");
			});
	node.dbclick(function(event) {
				console.log("双击");
			});
	node.mousedrag(function(event) {
				console.log("拖拽");
			});
	node.mouseover(function(event) {
				console.log("鼠标移入");
			});
	node.mousemove(function(event) {
				console.log("鼠标悬停移动");
			});
	node.mouseout(function(event) {
				console.log("鼠标移出");
				});

});
